<?php

namespace App\Component;

use Nette\Application\UI\Control;

class PhotoList extends Control {
  
  private $photos;

  /**
   * Init component
   * @param array $photos
   * @return \App\Component\PhotoList
   */
  public function init($photos){
    $this->photos = $photos;
    return $this;
  }

  /**
   * Render component
   */
	public function render() {
		$template = $this->template;
		$template->setFile(__DIR__ . '/photolist.latte');
    $template->photos = $this->photos;
		$template->render();
	}

}
